//
//  HJDAboutViewController.m
//  JYHospital
//
//  Created by 胡金东 on 16/6/15.
//  Copyright © 2016年 胡金东. All rights reserved.
//

#import "HJDAboutViewController.h"
#import "BSMacros.h"

@interface HJDAboutViewController ()

@end

@implementation HJDAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor getColorWithHexNumber:@"F1F0EE"];
    self.title = @"关于我们";
    [self.navigationController.navigationBar setTitleTextAttributes:
     @{NSFontAttributeName:[UIFont systemFontOfSize:19],
       NSForegroundColorAttributeName:[UIColor getColorWithHexNumber:@"848484"]}];
    [self setUpContent];
}

-(void)setUpContent{
    
    CGFloat imageX = IS_IPHONE_6?(HJDWidth - 89)/2:IS_IPHONE_6_PLUS?(HJDWidth - 134)/2:(HJDWidth - 89)/2;
    CGFloat imageY = HJDNavigHeight + 45;
    CGFloat imageW = IS_IPHONE_6?89:IS_IPHONE_6_PLUS?134:89;
    CGFloat imageH = IS_IPHONE_6?89:IS_IPHONE_6_PLUS?134:89;
    UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(imageX, imageY, imageW, imageH)];
    imageView.image = [UIImage imageNamed:@"关于我们"];
    [self.view addSubview:imageView];
    
    UILabel *lblName = [[UILabel alloc]initWithFrame:CGRectMake(imageX, CGRectGetMaxY(imageView.frame)+5, imageW, 30)];
    lblName.text = @"孕 宝 宝";
    lblName.textAlignment = NSTextAlignmentCenter;
    lblName.font = [UIFont systemFontOfSize:19];
    lblName.textColor = [UIColor getColorWithHexNumber:@"323232"];
    [self.view addSubview:lblName];
    
    UILabel *lblN = [[UILabel alloc]initWithFrame:CGRectMake(imageX, CGRectGetMaxY(lblName.frame) , imageW, 20)];
    lblN.text = @"孕育健康";
    lblN.textAlignment = NSTextAlignmentCenter;
    lblN.textColor = [UIColor getColorWithHexNumber:@"848484"];
    lblN.font = [UIFont systemFontOfSize:12];
    [self.view addSubview:lblN];
    
    CGFloat lblContentX = HJDHorizontalMargin/2;
    CGFloat lblContentY = CGRectGetMaxY(lblN.frame) + HJDVerticalMargin;
    CGFloat lblContentW = HJDWidth - HJDHorizontalMargin;
    UILabel *lblContent = [[UILabel alloc]init];
    lblContent.text = @"常州红房子APP v1.0以孕妈问诊、一键挂号、孕期管理、孕期档案为主要特色功能的医疗服务APP。通过每位孕妈数据信息的分析来方便、快捷、安全、高效便捷的反馈给每一位妈妈。\n\n常州红房子—孕期好帮手，帮助每一位妈妈生下健康、聪明的宝宝。";
    lblContent.font = [UIFont systemFontOfSize:14];
    lblContent.textColor = [UIColor getColorWithHexNumber:@"616060"];
    lblContent.numberOfLines = 0;
    CGRect lblContentRect = [lblContent.text boundingRectWithSize:CGSizeMake(lblContentW, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObjectsAndKeys:lblContent.font,NSFontAttributeName, nil] context:nil];
    lblContent.frame = (CGRect){{lblContentX,lblContentY},lblContentRect.size};
    [self.view addSubview:lblContent];
    
//    UILabel *companyName = [[UILabel alloc]initWithFrame:CGRectMake((HJDWidth - 80)/2, HJDHeight - 50 -10, 80, 15)];
//    companyName.text = @"大友医疗";
//    companyName.textAlignment = NSTextAlignmentCenter;
//    companyName.textColor = [UIColor getColorWithHexNumber:@"A4A4A4"];
//    companyName.font = [UIFont systemFontOfSize:12];
//    [self.view addSubview:companyName];
//    
//    UILabel *version = [[UILabel alloc]initWithFrame:CGRectMake((HJDWidth-250)/2, HJDHeight - 40 , 250, 15)];
//    version.text = @"Copyright © 2014-2018 All Rights Reserved";
//    version.textAlignment = NSTextAlignmentCenter;
//    version.textColor = [UIColor getColorWithHexNumber:@"A4A4A4"];
//    version.font = [UIFont systemFontOfSize:12];
//    [self.view addSubview:version];

}


@end
